﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FieldTools.Client.Model.Base
{
    /// <summary>
    /// 自定义CheckBoxModel
    /// </summary>
    public class CheckBoxModel
    {
        /// <summary>
        /// 展示文本
        /// </summary>
        public string? Text { get; set; }
        /// <summary>
        /// 是否选中
        /// </summary>
        public bool IsChecked { get; set; }
        
        //public int Status { get; set; } = 0;
        private int status;
        /// <summary>
        /// 状态
        /// </summary>
        public int Status
        {
            get { return status; }
            set { status = value; StatusText = value switch { 0 => "未开启", 1 => "已开启", _ => "未知" }; }
        }

        /// <summary>
        /// 状态描述
        /// </summary>
        public string? StatusText { get; set; }
    }
}
